package com.xoa.plugin.workflow.workflowservice.imlp.lnsfplugin;

import com.xoa.dev.efficiency.model.FlowAbilityMonitor;
import com.xoa.model.users.Users;
import com.xoa.plugin.workflow.workflowservice.WorkFlowService;
import com.xoa.util.ToJson;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;

public class Major_7 implements WorkFlowService {
    @Override
    public ToJson run(HttpServletRequest request) {
        String runId=request.getParameter("runId");
        LnsfUtil lnsfUtil=LnsfUtil.init();
        Users user=lnsfUtil.getUser(request);
        FlowAbilityMonitor flowAbilityMonitor=new FlowAbilityMonitor();
        flowAbilityMonitor.setRunId(Integer.parseInt(runId));
        flowAbilityMonitor.setUserId(user.getUserId());
        flowAbilityMonitor.setWorkType(1);
        flowAbilityMonitor.setUserType(7);
        flowAbilityMonitor.setWorkEnd(lnsfUtil.getSdf().format(new Date()));
        lnsfUtil.setData(flowAbilityMonitor);
        return null;
    }
}
